home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / pgs3f.lha / 3.0fUpdate / Macros.LHA / PlaceGraphicAt.rexx < prev    next >
OS/2 REXX Batch file  |  1995-01-31  |  1KB  |  46 lines

  1. /* $VER: PlaceGraphicAt.rexx 1.0 (30.01.95)
  2.    Copyright 1995 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. OPTIONS RESULTS
  6. TRACE OFF
  7.  
  8. /* Make sure rexx support is opened */
  9. IF ~SHOW('L','rexxsupport.library') THEN
  10.    CALL ADDLIB('rexxsupport.library',0,-30)
  11.  
  12. ADDRESS 'PAGESTREAM'
  13.  
  14. /* SELECT THE GRAPHIC */
  15. 'refresh wait'
  16. 'placegraphic status'
  17. if rc~=0 then signal cancel
  18.  
  19. /* GET THE OBJECT ID AND TYPE */
  20. 'getobject type objtype'
  21. objnum=result
  22.  
  23. /* POSITION THE PICTURE */
  24. getregion coord
  25. if (abs(p2d(coord.x1)-p2d(coord.x2)))<0.25 | (abs(p2d(coord.y1)-p2d(coord.y2)))<0.25 then DO
  26.     if objtype=12 then getpicture position pstem
  27.     if objtype=2 then getdrawing position pstem
  28.     if objtype=13 then geteps position pstem
  29.     coord.x2=p2d(pstem.right)+p2d(coord.x1)
  30.     coord.y2=p2d(pstem.bottom)+p2d(coord.y1)
  31. end
  32.  
  33.  
  34. if objtype=12 then editpicture position coord.x1 coord.y1 coord.x2 coord.y2
  35. if objtype=2 then editdrawing position coord.x1 coord.y1 coord.x2 coord.y2
  36. if objtype=13 then editeps position coord.x1 coord.y1 coord.x2 coord.y2
  37.  
  38. 'refresh continue'
  39.  
  40. EXIT
  41.  
  42.  
  43. CANCEL:
  44. 'refresh continue'
  45. EXIT
  46.